package com.ibm.risk.irmp.data.table.dao;

import com.ibm.risk.irmp.data.table.entity.DataTable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface TableDefRepository extends JpaRepository<DataTable, String> {

    @Query("select t from DataTable t join DataGroupTable g on t.tableCode = g.tableCode and g.groupCode = ?1")
    List<DataTable> findByGroup(String groupCode);
}
